package jumpingnotes.model.entity;

// Generated Aug 10, 2008 2:18:38 PM by Hibernate Tools 3.2.1.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * ActivityTemplate generated by hbm2java
 */
@Entity
@Table(name = "activity_template", catalog = "jumping_notes")
public class ActivityTemplate implements java.io.Serializable
{

	private Integer activityTemplateId;
	private String name;
	private String type;
	private String content;
	private Set<Activity> activities = new HashSet<Activity>(0);

	public ActivityTemplate()
	{
	}

	public ActivityTemplate(String name, String type, String content, Set<Activity> activities)
	{
		this.name = name;
		this.type = type;
		this.content = content;
		this.activities = activities;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "activity_template_id", unique = true, nullable = false)
	public Integer getActivityTemplateId()
	{
		return this.activityTemplateId;
	}

	public void setActivityTemplateId(Integer activityTemplateId)
	{
		this.activityTemplateId = activityTemplateId;
	}

	@Column(name = "name", length = 50)
	public String getName()
	{
		return this.name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	@Column(name = "type", length = 50)
	public String getType()
	{
		return this.type;
	}

	public void setType(String type)
	{
		this.type = type;
	}

	@Column(name = "content", length = 65535)
	public String getContent()
	{
		return this.content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "activityTemplate")
	public Set<Activity> getActivities()
	{
		return this.activities;
	}

	public void setActivities(Set<Activity> activities)
	{
		this.activities = activities;
	}

}
